<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script type="text/javascript">
	var roomid = 1;
	$(function() {
		$('#cc').combobox({
			url : '${ctx}/room/getAllRoom',
			valueField : 'id',
			textField : 'name',
			required:true,
			onSelect : function(param) {
				$("#roomId").val(param.id);
			}
		});
		$('#roomDelForm').form({
			url : "${ctx}/room/deleteRoom?",
			onSubmit : function() {
				var isValid = $(this).form('validate');
				if (!isValid) {

				}
				return isValid;
			},
			success : function(result) {
				//progressClose();
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.handler.dialog('close');
					var tab = $('#index_tabs').tabs('getSelected');  // get selected panel
					tab.panel('refresh');
				} else {
					parent.$.messager.alert('错误', result.msg, 'error');
				}
			}
		});
	});
</script>
<div id="roleGrantLayout" class="easyui-layout" data-options="fit:true,border:false">
	<div class="well well-small">
		<form id="roomDelForm" method="post">
			<table>
				<tr>
					<td>选择会议室：</td>
					<td><input id="cc" name="roomName">
					</td>
				</tr>
			</table>
			<input id="roomId" name="id" type="hidden" value="">
			<!-- -->
			<input name="roomiid" type="hidden" value="${roomEvent.id}">
			<!-- -->
			<input name="ownerId" type="hidden" value="${roomEvent.ownerId}">
			<!-- -->
			<input name="nowLogin" type="hidden" value="${sessionInfo.loginName}">
			<!-- -->
			<input name="nowLoginId" type="hidden" value="${sessionInfo.id}">
			<!-- -->
		</form>
	</div>
</div>